home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2000 #4 / Amiga Plus CD - 2000 - No. 4.iso / PowerPC / Dev / PPCRelease / Examples / Bustest / BusTestPPC.doc < prev    next >
Encoding:
Text File  |  1998-07-25  |  1.8 KB  |  48 lines

  1. Well...this program should show that certain people either
  2. spread misinformation on purpose or just don`t know it better.
  3. To measure the memory *BUS* performace and NOT the CPU
  4. performance you have to understand how the cache works.
  5.  
  6. For CopyBack mode:
  7. If you measure the WRITE bus performace you have to subtract
  8. the LINE prefetch.
  9. If you measure the READ bus performance you shouldn`t measure
  10. the CPU's own cache controller latency as you would do with
  11. something like that:
  12.  
  13. ;gpr3=LINE start
  14.  lwz gpr4,0(gpr3)    ;stall until this word is in the cache
  15.  lwz gpr5,4(gpr3)    ;stall until this word is in the cache
  16.  lwz gpr6,8(gpr3)    ;stall until this word is in the cache
  17.  lwz gpr7,12(gpr3)    ;stall until this word is in the cache
  18.  lwz gpr8,16(gpr3)    ;stall until this word is in the cache
  19.  lwz gpr9,20(gpr3)    ;stall until this word is in the cache
  20.  lwz gpr10,24(gpr3)    ;stall until this word is in the cache
  21.  lwz gpr11,28(gpr3)    ;stall until this word is in the cache
  22. ..basicly you measure the LINE read + CPU Cache stalls.
  23.  
  24.  
  25. Correct would be
  26.  lwz gpr4,0(gpr3)    ;stall until this word is in the cache(hides line read)
  27.  lwz gpr5,32(gpr3)    ;stall until this word is in the cache
  28.             ;and that`s after the last line is read(hides line read)
  29.  lwz gpr6,64(gpr3)    ;stall until this word is in the cache
  30.             ;and that`s after the last line is read(hides line read)
  31.  lwz gpr7,96(gpr3)    ;stall until this word is in the cache
  32.             ;and that`s after the last line is read(hides line read)
  33.  
  34. this in continues memory and with a greater loop. Then these
  35. accesses are in pipeline so it doesn`t matter that the last
  36. lwz gpr7 returns before the line is read complete.
  37.  
  38.  
  39. For non COPYBACK modes the situation looks
  40. different.
  41.  
  42.  
  43. The Cache Speed test is disabled because it doesn`t work
  44. reliable(yet).
  45.  
  46. P.S.
  47. Source is provided to avoid another conspiracy thread.
  48.